<?php

	/*
		Class Name: employee
		Description: manage enterprise employee
		Created On: March 16, 2014
		Created By: Lenin Rodríguez
		History:		
	*/
	
	require_once ('../libs/dbConnector.php');
	require_once ('../businessObjects/rtmsEvent.php');	
	require_once ('../businessObjects/bsObjectMessages.php');	
	require_once ('../businessObjects/sysConfigParameters.php');	
	
	class employee {
			var $dbConn;
			var $message;			
			var $resultSet;						
			function message(){return $this->message;}
			function resultSet() {return $this->resultSet;}			
			function getEmployee($enterpriseId){
				$dbConn = new dbConnector();				
				$boolres = false;
				
				if ($dbConn->openConnection()){													   
					$query = 'select * from employee ';
					$query .= ($enterpriseId != '') ? ' where enterpriseID ='.$enterpriseId : '';
					$query .= ' order by employeeID ASC';
					$dbConn->query($query);
					$this->resultSet = $dbConn->queryResults();					
					$boolres = true;
				}else{
					$this->message = bsObjectMessages::something_went_wrong.$dbConn->message();
					$boolres = false;
				}
				$dbConn->closeConnection();
				return $boolres;
			}			
		}
?>